package com.yht.org.mapper;

import com.yht.org.domain.Department;
import com.yht.org.domain.Employee;
import com.yht.org.query.DepartmentQuery;
import com.yht.org.query.EmployeeQuery;

import java.util.List;

public interface EmployeeMapper {

    /**
     * 查询所有
     * @return
     */
    List<Employee> selectAll();

    /**
     * 根据id查询
     * @param id
     * @return
     */
    Employee selectById(Long id);

    /**
     * 添加一条
     * @param employee
     */
    void insert(Employee employee);

    /**
     * 根据id删除一条
     * @param id
     */
    void delete(Long id);

    /**
     * 修改
     * @param employee
     */
    void update(Employee employee);

    /**
     * 查询总条数
     * @return
     */
    Integer selectCount(EmployeeQuery employeeQuery);

    /**
     * 分页查询
     * @param employeeQuery
     * @return
     */
    List<Employee> selectByEmployeeQuery(EmployeeQuery employeeQuery);

}
